<?php

use Illuminate\Database\Seeder;

class ManagerSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = \Faker\Factory::create('zh_CN');
        $data = [];
        for ($i = 0; $i < 100; $i++) {
            $data[] = [
                // 'username' => 'ge'. sprintf('%03.0f', $i+1),
                'username' => $faker->unique()->userName(),
                'password' => bcrypt('123'),
                'gender' => rand(1, 3),
                'telephone' => $faker->phoneNumber(),
                'email' => $faker->email(),
                'role_id' => rand(1, 6),
                'status' => rand(1, 2)
            ];
        }
        DB::table('manager')->insert($data);
    }
}
